<%@ page 
	language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"
    import="com.cdshop.web.PageUtil,com.cdshop.dao.obj.CartGoods,java.util.List"
%>
<jsp:useBean id="model" class="com.cdshop.mvc.CartPM" scope="request"/>
<%	
	model.populate(pageContext);
%>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title></title>
  <%@ include file="../inc/default.jsp" %>
</head>
<body>
 <div id="container" style="display:inline-table;">
	<div id="head"><img src="<%=request.getContextPath()%>/img/logo.jpg" /></div>
	<div id="banner"></div>
	<div id="content">
		<div align="center">
			<h1>购物车</h1>
			<table cellpadding="0" cellspacing="1" 
				   class="list">
				<col width="100"/>
				<col width="100"/>
				<col width="200"/>
				<col width="140"/>
				<col width="60"/>
				<col width="100"/>
				<col width="100"/>
				<tr class="trhead">
					<th align="left">名称</th>
					<th align="left">类别</th>
					<th align="left">简述</th>
					<th align="left">上市时期</th>
					<th align="left">价格</th>
					<th align="left">条码</th>
					<th align="left">移掉</th>
				</tr>
				<%
					List<CartGoods> list=model.getGoods();
					for(int i=0,n=list.size();i<n;i++){
						CartGoods goods=list.get(i);
				%>
				<tr class="tritem">
					<td align="left"><a href="javascript:void 0;" title="<%=goods.getName() %>"><strong><%=goods.getName() %></strong></a></td>
					<td align="left">
						类别 <%=goods.getCategory()%>	
					</td>
					<td align="left"><%=goods.getDesc() %></td>
					<td align="left"><%=PageUtil.formatDate(goods.getTstamp(),"yyyy年MM月dd日") %></td>
					<td align="left">&#165;<%=PageUtil.formatNumber(goods.getPrice(),"0.00") %></td>
					<td align="left"><%=goods.getBarcode() %></td>
					<td align="left"><a href="javascript:HJS.retreat({cid:<%=goods.getCid() %>});void 0;">退了</a></td>
				</tr>
				<%
					}
				%>
			</table>
			<div style="margin:10px;padding:10px;">
				<button onclick="window.close();">关闭窗口</button>
			</div>
		</div>  
	</div>
	<%@ include file="../inc/footer.jsp" %> 
</div>
<script type="text/javascript">
//<![CDATA[
var PJS={
	init:function(){
		jQuery("tr.tritem:even").addClass("evenClass");
		jQuery("tr.tritem").hover(function(){jQuery(this).addClass("onOverClass");},function(){jQuery(this).removeClass("onOverClass");});
	}
};
jQuery(PJS.init);
//]]>
</script>
</body>
</html>